/*****************************************
 *  所有版权(c) 上海塔齐通讯技术有限公司       *
 *****************************************/
package com.touch.sysif.sms.api.model;


/**
 * 短信
 * @version $Revision: 1.0 $ 
 * @author yanxiao
 * @date: Jan 17, 2014
 * @time: 10:16:27 PM
 */
public class SmsMessage  implements java.io.Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -8031857499587814180L;

	private String batchId;

    private String content;

    private String destAddr;

    private Boolean reqReport = true;

    private java.util.Date sendTime;

    private String smsParam;

    private String sourceAddr = "";

    public SmsMessage() {
    }

    public SmsMessage(
           String batchId,
           String content,
           String destAddr,
           Boolean reqReport,
           java.util.Date sendTime,
           String smsParam,
           String sourceAddr) {
           this.batchId = batchId;
           this.content = content;
           this.destAddr = destAddr;
           this.reqReport = reqReport;
           this.sendTime = sendTime;
           this.smsParam = smsParam;
           this.sourceAddr = sourceAddr;
    }


    /**
     * Gets the batchId value for this SmsMessage.
     * 
     * @return batchId
     */
    public String getBatchId() {
        return batchId;
    }


    /**
     * Sets the batchId value for this SmsMessage.
     * 
     * @param batchId
     */
    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }


    /**
     * Gets the content value for this SmsMessage.
     * 
     * @return content
     */
    public String getContent() {
        return content;
    }


    /**
     * Sets the content value for this SmsMessage.
     * 
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }


    /**
     * Gets the destAddr value for this SmsMessage.
     * 
     * @return destAddr
     */
    public String getDestAddr() {
        return destAddr;
    }


    /**
     * Sets the destAddr value for this SmsMessage.
     * 
     * @param destAddr
     */
    public void setDestAddr(String destAddr) {
        this.destAddr = destAddr;
    }


    /**
     * Gets the reqReport value for this SmsMessage.
     * 
     * @return reqReport
     */
    public Boolean getReqReport() {
        return reqReport;
    }


    /**
     * Sets the reqReport value for this SmsMessage.
     * 
     * @param reqReport
     */
    public void setReqReport(Boolean reqReport) {
        this.reqReport = reqReport;
    }


    /**
     * Gets the sendTime value for this SmsMessage.
     * 
     * @return sendTime
     */
    public java.util.Date getSendTime() {
        return sendTime;
    }


    /**
     * Sets the sendTime value for this SmsMessage.
     * 
     * @param sendTime
     */
    public void setSendTime(java.util.Date sendTime) {
        this.sendTime = sendTime;
    }


    /**
     * Gets the smsParam value for this SmsMessage.
     * 
     * @return smsParam
     */
    public String getSmsParam() {
        return smsParam;
    }


    /**
     * Sets the smsParam value for this SmsMessage.
     * 
     * @param smsParam
     */
    public void setSmsParam(String smsParam) {
        this.smsParam = smsParam;
    }


    /**
     * Gets the sourceAddr value for this SmsMessage.
     * 
     * @return sourceAddr
     */
    public String getSourceAddr() {
        return sourceAddr;
    }


    /**
     * Sets the sourceAddr value for this SmsMessage.
     * 
     * @param sourceAddr
     */
    public void setSourceAddr(String sourceAddr) {
        this.sourceAddr = sourceAddr;
    }

    
    @Override
	public String toString() {
		return "SmsMessage [batchId=" + batchId + ", content=" + content
				+ ", destAddr=" + destAddr + ", reqReport=" + reqReport
				+ ", sendTime=" + sendTime + ", smsParam=" + smsParam
				+ ", sourceAddr=" + sourceAddr + "]";
	}



	private Object __equalsCalc = null;
    public synchronized boolean equals(Object obj) {
        if (!(obj instanceof SmsMessage)) return false;
        SmsMessage other = (SmsMessage) obj;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.batchId==null && other.getBatchId()==null) || 
             (this.batchId!=null &&
              this.batchId.equals(other.getBatchId()))) &&
            ((this.content==null && other.getContent()==null) || 
             (this.content!=null &&
              this.content.equals(other.getContent()))) &&
            ((this.destAddr==null && other.getDestAddr()==null) || 
             (this.destAddr!=null &&
              this.destAddr.equals(other.getDestAddr()))) &&
            ((this.reqReport==null && other.getReqReport()==null) || 
             (this.reqReport!=null &&
              this.reqReport.equals(other.getReqReport()))) &&
            ((this.sendTime==null && other.getSendTime()==null) || 
             (this.sendTime!=null &&
              this.sendTime.equals(other.getSendTime()))) &&
            ((this.smsParam==null && other.getSmsParam()==null) || 
             (this.smsParam!=null &&
              this.smsParam.equals(other.getSmsParam()))) &&
            ((this.sourceAddr==null && other.getSourceAddr()==null) || 
             (this.sourceAddr!=null &&
              this.sourceAddr.equals(other.getSourceAddr())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getBatchId() != null) {
            _hashCode += getBatchId().hashCode();
        }
        if (getContent() != null) {
            _hashCode += getContent().hashCode();
        }
        if (getDestAddr() != null) {
            _hashCode += getDestAddr().hashCode();
        }
        if (getReqReport() != null) {
            _hashCode += getReqReport().hashCode();
        }
        if (getSendTime() != null) {
            _hashCode += getSendTime().hashCode();
        }
        if (getSmsParam() != null) {
            _hashCode += getSmsParam().hashCode();
        }
        if (getSourceAddr() != null) {
            _hashCode += getSourceAddr().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(SmsMessage.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://sms.sysif.touch.com/api/model", "SmsMessage"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("batchId");
        elemField.setXmlName(new javax.xml.namespace.QName("", "batchId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("content");
        elemField.setXmlName(new javax.xml.namespace.QName("", "content"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("destAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "destAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("reqReport");
        elemField.setXmlName(new javax.xml.namespace.QName("", "reqReport"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sendTime");
        elemField.setXmlName(new javax.xml.namespace.QName("", "sendTime"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("smsParam");
        elemField.setXmlName(new javax.xml.namespace.QName("", "smsParam"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sourceAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "sourceAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
